/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.osbosoftware.vista.utils;

import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

/**
 *
 * @author osboCEO
 */
public class Sesionweb {
    FacesContext fc;
    HttpSession hse;
    public Sesionweb(){
        fc=FacesContext.getCurrentInstance();
        hse=(HttpSession) fc.getExternalContext().getSession(false);
    }
    public Object getAtributo(String nombre){
        return hse.getAttribute(nombre);
    }
    public void setAtributo(String nombre,Object atributo){
        hse.setAttribute(nombre,atributo);
    }
    public void terminarSession(){
	hse.invalidate();
    }
}